<% content_for :sidebar do -%>
  <h4><%= link_to "返回管理面板", :controller => "/admin/general", :action => "index" %></h4>
<% end -%>

<h1>网站数据统计</h1>
<p>关于访问量方面的数据请查看 Google Analytics</p>
<div class="span-5">
  <h3 class="nt">用户统计</h3>
  <%= render :partial => "stat", :object => User.archives %>
</div>
<div class="clear"></div>

<div class="span-5">
  <h3 class="nt">学校统计</h3>
  <%= render :partial => "stat", :object => School.archives %>
</div>
<div class="span-5">
  <h3 class="nt">学校留言统计</h3>
  <%= render :partial => "stat", :object => SchoolComment.archives %>
</div>
<div class="span-5">
  <h3 class="nt">学校探访统计</h3>
  <%= render :partial => "stat", :object => Visited.archives %>
</div>
<div class="clear"></div>

<div class="span-5">
  <h3 class="nt">活动统计</h3>
  <%= render :partial => "stat", :object => Event.archives %>
</div>
<div class="span-5">
  <h3 class="nt">活动留言统计</h3>
  <%= render :partial => "stat", :object => EventComment.archives %>
</div>
<div class="span-5">
  <h3 class="nt">活动参与统计</h3>
  <%= render :partial => "stat", :object => Participation.archives %>
</div>
<div class="clear"></div>

<div class="span-5">
  <h3 class="nt">话题统计</h3>
  <%= render :partial => "stat", :object => Topic.archives %>
</div>
<div class="span-5">
  <h3 class="nt">回复统计</h3>
  <%= render :partial => "stat", :object => Post.archives %>
</div>
<script type="text/javascript">
$(document).ready(function(){
  $("tr").each(function(i){
    if(i%2 == 0) {
      $(this).addClass('odd');
    }else{$(this).addClass('even');}
  });
});
</script>